import request from '@/utils/request'
const serviceName = 'Task'
//  列表
export function queryServices(data) {
  return request({
    url: serviceName + '/Service/QueryCustomerServices',
    method: 'post',
    data
  })
}
//  详情
export function getService(data) {
  return request({
    url: serviceName + '/Service/GetCustomerService',
    method: 'post',
    data
  })
}
//  新增 修改
export function saveService(data) {
  return request({
    url: serviceName + '/Service/SaveCustomerService',
    method: 'post',
    data
  })
}
//  删除
export function deleteServices(data) {
  return request({
    url: serviceName + '/Service/DeleteCustomerServices',
    method: 'post',
    data
  })
}
//  可派单维修工
export function getRepairers() {
  return request({
    url: serviceName + '/Service/GetRepairers',
    method: 'get'
  })
}
//  派单
export function deliverService(data) {
  return request({
    url: serviceName + '/Service/DeliverCustomerService',
    method: 'post',
    data
  })
}
//  待接单维修工
export function getAcceptRepairers(Id) {
  return request({
    url: serviceName + '/Service/GetAcceptRepairers?Id=' + Id,
    method: 'get'
  })
}
//  接单
export function acceptService(data) {
  return request({
    url: serviceName + '/Service/AcceptCustomerService',
    method: 'post',
    data
  })
}
//  处理
export function processService(data) {
  return request({
    url: serviceName + '/Service/ProcessCustomerService',
    method: 'post',
    data
  })
}
//  退单
export function backService(data) {
  return request({
    url: serviceName + '/Service/BackCustomerService',
    method: 'post',
    data
  })
}
//  挂起
export function hangupService(data) {
  return request({
    url: serviceName + '/Service/HangupCustomerService',
    method: 'post',
    data
  })
}
//  恢复
export function restoreService(data) {
  return request({
    url: serviceName + '/Service/RestoreCustomerService',
    method: 'post',
    data
  })
}
//  转单
export function transferService(data) {
  return request({
    url: serviceName + '/Service/TransferCustomerService',
    method: 'post',
    data
  })
}
//  协同
export function teamworkService(data) {
  return request({
    url: serviceName + '/Service/TeamworkCustomerService',
    method: 'post',
    data
  })
}
//  回访
export function callbackService(data) {
  return request({
    url: serviceName + '/Service/CallbackCustomerService',
    method: 'post',
    data
  })
}
//  关单
export function closeService(data) {
  return request({
    url: serviceName + '/Service/CloseCustomerService',
    method: 'post',
    data
  })
}

// 流转记录
export function queryRecord(data) {
  return request({
    url: serviceName + '/Service/QueryServiceOpeRecord',
    method: 'post',
    data
  })
}

export default {
  queryServices,
  getService,
  saveService,
  deleteServices,
  getRepairers,
  deliverService,
  getAcceptRepairers,
  acceptService,
  processService,
  backService,
  hangupService,
  restoreService,
  transferService,
  teamworkService,
  callbackService,
  closeService,
  queryRecord
}
